package com.wl.blog.base.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.File;

/**
 * @创建人 万磊
 * @创建时间 2021/12/4
 * 好好学习，天天向上
 *
 * 负责页面的统一跳转
 */
@Controller
public class ViewController {

    @RequestMapping("/toView/{firstView}/{secondView}/{thirdView}")
    public String toView(
            @PathVariable("firstView") String firstView,
            @PathVariable("secondView") String secondView,
            @PathVariable("thirdView") String thirdView){

        //File.separator代表不同操作系统下的斜杠(\)
        return firstView + File.separator + secondView +  File.separator + thirdView;

    }
}
